package com.itheima.Jiuye10;

import java.util.ArrayList;
import java.util.stream.Stream;

public class TestActor {
    public static void main(String[] args) {
        ArrayList<String> man = new ArrayList<>();
        man.add("张国荣");
        man.add("张晋");
        man.add("刘烨野");
        man.add("徐峥");
        man.add("汪峰");
        man.add("王宝强");
        ArrayList<String> woman = new ArrayList<>();
        woman.add("王菲");
        woman.add("关晓彤");
        woman.add("郑爽");
        woman.add("杨紫");
        woman.add("赵丽颖");
        woman.add("杨幂");
        Stream<String> manlist = man.stream().filter(name -> name.length() == 3).limit(2);
        Stream<String> womanlist = woman.stream().filter(name -> name.startsWith("杨")).skip(1);
        Stream.concat(manlist,womanlist).forEach(s -> {
            Actor act = new Actor(s);
            System.out.println(act);
        });
    }


}
